﻿<phone:PhoneApplicationPage 
    x:Class="Twitt.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" 
    d:DataContext="{d:DesignData ../SampleData/MainViewModelSampleData.xaml}"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
    <StackPanel>
            <ProgressBar x:Name="ProgressBar" VerticalAlignment="Top" IsIndeterminate="{Binding ProgressBarIsIndeterminate, Mode=OneWay}" Visibility="{Binding ProgressBarVisibility, Mode=OneWay }" Style="{StaticResource PerformanceProgressBar}"/>
 
        <!--Panorama control-->
        <controls:Panorama Title="Twitt">
                <controls:Panorama.Background>
                    <ImageBrush ImageSource="..\Resources\Images\PanoramaBackground.png"/>
                </controls:Panorama.Background>
 
                <!--Panorama item one-->
                <controls:PanoramaItem Header="statuses">
                    <ListBox Margin="0,0,-12,32" ItemsSource="{Binding Items}" SelectionChanged="ListBoxSelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0,0,0,17">
                                    <Image Source="{Binding Image}" Margin="12,0,12,0" Width="50" Height="50" />
                                    <StackPanel Width="361" >
                                        <TextBlock Text="{Binding DisplayUserName}" FontSize="{StaticResource PhoneFontSizeExtraLarge}" Foreground="{Binding TitleColor}"/>
                                        <TextBlock Text="{Binding CreatedDate}" Margin="0,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                        <TextBlock Text="{Binding TweetText}" TextWrapping="Wrap" Margin="0,-6,12,0" />
                                    </StackPanel>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </controls:PanoramaItem>

                <controls:PanoramaItem Header="mentions">
                    <ListBox Margin="0,0,-12,32" ItemsSource="{Binding MentionItems}" SelectionChanged="ListBoxSelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0,0,0,17">
                                    <Image Source="{Binding Image}" Margin="12,0,12,0" Width="50" Height="50" />
                                    <StackPanel Width="361" >
                                        <TextBlock Text="{Binding DisplayUserName}" FontSize="{StaticResource PhoneFontSizeExtraLarge}" Foreground="{Binding TitleColor}"/>
                                        <TextBlock Text="{Binding CreatedDate}" Margin="0,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                        <TextBlock Text="{Binding TweetText}" TextWrapping="Wrap" Margin="0,-6,12,0" />
                                    </StackPanel>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </controls:PanoramaItem>

                <controls:PanoramaItem Header="messages">
                    <ListBox Margin="0,0,-12,32" ItemsSource="{Binding DirectMessageItems}" SelectionChanged="ListBoxSelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0,0,0,17">
                                    <Image Source="{Binding Image}" Margin="12,0,12,0" Width="50" Height="50" />
                                    <StackPanel Width="361" >
                                        <TextBlock Text="{Binding DisplayUserName}" FontSize="{StaticResource PhoneFontSizeExtraLarge}" Foreground="{Binding TitleColor}"/>
                                        <TextBlock Text="{Binding CreatedDate}" Margin="0,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                        <TextBlock Text="{Binding TweetText}" TextWrapping="Wrap" Margin="0,-6,12,0" />
                                    </StackPanel>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </controls:PanoramaItem>

                <controls:PanoramaItem Header="favorites">
                    <ListBox Margin="0,0,-12,32" ItemsSource="{Binding FavoriteItems}" SelectionChanged="ListBoxSelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Orientation="Horizontal" Margin="0,0,0,17">
                                    <Image Source="{Binding Image}" Margin="12,0,12,0" Width="50" Height="50" />
                                    <StackPanel Width="361" >
                                        <TextBlock Text="{Binding DisplayUserName}" FontSize="{StaticResource PhoneFontSizeExtraLarge}"/>
                                        <TextBlock Text="{Binding CreatedDate}" Margin="0,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}"/>
                                        <TextBlock Text="{Binding TweetText}" TextWrapping="Wrap" Margin="0,-6,12,0" />
                                    </StackPanel>
                                </StackPanel>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>
                </controls:PanoramaItem>
            
                            <!--Panorama item three-->
                <controls:PanoramaItem Header="settings">
                    <StackPanel>
                        <Button x:Name="SettingsButton" Content="Account Settings" Click="SettingsButtonClick"/>
                        <Button x:Name="TweetButton" Margin="0,30,0,0" Content="New Tweet" Click="TweetButtonClick"/>
                        <Button x:Name="RefreshButton" Margin="0,30,0,0" Content="Refresh" Click="RefreshButtonClick"/>
                    </StackPanel>
                </controls:PanoramaItem>
            </controls:Panorama>
        </StackPanel>
    </Grid>
 
    <!--Panorama-based applications should not show an ApplicationBar-->

</phone:PhoneApplicationPage>